package com.lagou.sqlSession;

import java.util.List;

/**
 * description SqlSession
 * author wy
 * date 2021-04-07 20:11
 **/
public interface SqlSession
{
    //查询所有数据
    <E> List<E> selectList(String statementId, Object... params) throws Exception;

    //查询一条数据
    <T> T selectOne(String statementId, Object... params) throws Exception;

    //插入
    int insert(String statementId, Object... params) throws Exception;

    //修改
    int update(String statementId, Object... params) throws Exception;

    //删除
    int delete(String statementId, Object... params) throws Exception;

    <T> T getMapper(Class<?> mapperClass);
}
